<div class="bg-light lter b-b wrapper-md">
  <h1 class="m-n font-thin h3">接口列表</h1>
</div>

  <div class="panel panel-default">

    <!--  按钮  -->
    <div class="panel-heading">
      <div class="row">
        <div class="col-sm-6  ">
          <button class="btn m-b-xs w-xs btn-success" ng-click="search()">搜索</button>
        </div>
      </div>
    </div>

    <!--  搜索框  -->
    <div class="row wrapper" >
      <div class="col-sm-6 m-b-xs">
        <div class="input-group" >
          <div class="input-group-btn" >
            <span class="btn btn-default">服务编码</span>
          </div>
          <ui-select ng-model="search.center_code" ng-init="search.center_code=sel.center_code[0]" theme="bootstrap">
            <ui-select-match placeholder="选择">{{$select.selected.label}}</ui-select-match>
            <ui-select-choices repeat="item in sel.center_code | filter: $select.search">
              <span ng-bind-html="item.label"></span>
            </ui-select-choices>
          </ui-select>
        </div>
      </div>

      <div class="col-sm-6 m-b-xs">
        <div class="input-group" >
          <div class="input-group-btn" >
            <span class="btn btn-default">权限类型</span>
          </div>
          <ui-select ng-model="search.auth_type" ng-init="search.auth_type=sel.auth_type[0]" theme="bootstrap">
            <ui-select-match placeholder="选择">{{$select.selected.label}}</ui-select-match>
            <ui-select-choices repeat="item in sel.auth_type | filter: $select.search">
              <span ng-bind-html="item.label"></span>
            </ui-select-choices>
          </ui-select>
        </div>
      </div>

      <div class="col-sm-6 m-b-xs">
        <div class="input-group" >
          <div class="input-group-btn" >
            <span class="btn btn-default">接口类型</span>
          </div>
          <ui-select ng-model="search.type" ng-init="search.type=sel.type[0]" theme="bootstrap">
            <ui-select-match placeholder="选择">{{$select.selected.label}}</ui-select-match>
            <ui-select-choices repeat="item in sel.type | filter: $select.search">
              <span ng-bind-html="item.label"></span>
            </ui-select-choices>
          </ui-select>
        </div>
      </div>

      <div class="col-sm-6 m-b-xs">
        <div class="input-group" >
          <div class="input-group-btn" >
            <span class="btn btn-default">URL</span>
          </div>
          <input type="text" class="form-control ng-pristine ng-valid ng-touched" ng-model="search.url">
        </div>
      </div>
    </div>


    <!--  数据表格  -->
    <table class="table table-striped table-bordered ng-isolate-scope dataTable no-footer" 
      style="display: table; width: 100%;table-layout:fixed;">
      <thead>
        <tr>
          <th style="width: 13%;text-align:center;">接口标识</th>
          <th style="width: 18%;text-align:center;">URL</th>
          <th style="width: 3%;text-align:center;">类型</th>
          <th style="width: 5%;text-align:center;">描述</th>
          <th style="width: 7%;text-align:center;">操作</th>
        </tr>
      </thead>
      <tbody>
        <tr ng-repeat="info in apiList">
          <td>{{info.id}}<br/>{{info.name}}</td>
          <td ng-bind-html="info.url"></td>
          <td style="text-align:center;">{{info.type=='s'?"XML":"Class"}}</td>
          <td>
            <div style="overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;">
              {{info.description}}
            </div>
          </td>
          <td>
            <button type="button" class="btn btn-info btn-xs" ng-click="getRole(info)">权限范围</button>
            <button type="button" class="btn btn-info btn-xs" ng-click="authType(info)">设置权限</button>
            <button type="button" class="btn btn-info btn-xs" ng-click="edit(info)">编辑</button>
            <button type="button" class="btn btn-info btn-xs" ng-click="setApi(info)">绑定</button>
            <button type="button" class="btn btn-info btn-xs" ng-click="param(info)">参数</button>
          </td>
        </tr>
      </tbody>
    </table>

    
    <div class="text-right" style="background-color: white">
    <pagination 
        total-items="totalItems" 
        ng-model="currentPage" 
        ng-change="search()"
        previous-text="上一页"
        next-text="下一页"
        first-text="首页"
        last-text="尾页"
        max-size="5"
        boundary-links="true"
        rotate="false"
        items-per-page="itemsPerPage"
        class="m-t-none m-b"></pagination>
    </div>

    
  </div>

